package com.jyh.blog.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jyh.blog.dto.*;
import com.jyh.blog.entity.Article;
import com.jyh.blog.vo.ConditionVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (Article)表数据库访问层
 *
 * @author jyh
 * @since 2023-02-01 15:25:22
 */
@Repository
public interface ArticleDao extends BaseMapper<Article> {

    List<ArticleBackDTO> articleBackList(@Param("current") Long current, @Param("size") Long size,@Param("condition") ConditionVO conditionVO);

    Integer countBackArticle(@Param("condition") ConditionVO conditionVO);


    List<ArticleStatisticsDTO> statisticArticleList();

    List<ArticleHomeDTO> articleHomeDTOList(@Param("current") Long current,@Param("size") Long size);

    List<ArticleRecommendDTO> recommendArticleList(String id);

    ArticleDTO getArticleById(String id);

    List<ArticlePreviewDTO> articlePreviewList(@Param("current") Long limitCurrent,@Param("size") Long size,@Param("condition") ConditionVO conditionVO);
}

